package com.jeasy.base.model;

import java.io.Serializable;
import java.util.Map;

import com.jeasy.AnnotationValidable;
import com.jeasy.collection.MapExUtils;
import com.jeasy.doc.annotation.InitField;

import lombok.Data;

/**
 * BaseModel
 * @author taomk
 * @version 1.0
 * @since 2015/05/13 17:34
 */
@Data
public class BaseModel implements AnnotationValidable, Serializable {

	private static final long serialVersionUID = 5409185459234711691L;

	/**
	 * 主键
	 */
	@InitField(value = "", desc = "主键ID")
	private Long id;
	/**
	 * 是否删除
	 */
	@InitField(value = "", desc = "是否删除")
	private Long isDel;
	/**
	 * 创建时间
	 */
	@InitField(value = "", desc = "创建时间")
	private Long createAt;
	/**
	 * 创建者ID
	 */
	@InitField(value = "", desc = "创建者ID")
	private String createBy;
	/**
	 * 创建者名称
	 */
	@InitField(value = "", desc = "创建者名称")
	private String createName;
	/**
	 * 更新时间
	 */
	@InitField(value = "", desc = "更新时间")
	private Long updateAt;
	/**
	 * 更新者ID
	 */
	@InitField(value = "", desc = "更新者ID")
	private String updateBy;
	/**
	 * 更新者名称
	 */
	@InitField(value = "", desc = "更新者名称")
	private String updateName;

	public Map<String, Object> toObjMap() {
		return MapExUtils.toObjMap(this);
	}
}